# Shm-actor

A syndicate actor for managing shared memory objects on devices running linux. Requires syndicate-py and a running dataspace implementation.

## Demo

Two additional actors are included in the `example` directory to run a demo of the shm-actor. 

To run the full demo, first start a Dataspace. I use the `syndicate-server`. You can install this dataspace server impl using the following commands:

```Bash
git clone https://git.syndicate-lang.org/syndicate-lang/syndicate-rs
cd syndicate-rs
cargo build --release
./target/release/syndicate-server -c dev-scripts/benchmark-config.pr
```

In a new terminal, run the shm-actor
```python
python3 shm-actor.py
```

Then in yet another terminal, start running a consumer which will listen on a specific buffer:
```python
python3 example/consumer.py
```

Finally, in a fourth terminal, start running a producer which will use the shm-actor to aquire a shared memory resource, write to it, then signal that it's write has finished:
```python
python3 example/producer.py
```